import 'component/common.scss'
import React from "react";
import { connect } from "react-redux";
import BottomBar from "../BottomBar/BottomBar";
import Loadable from 'component/MyLoadable/MyLoadable'

const Home = Loadable(() => import(/* webpackChunkName: "order" */'../Home/Home'))

const Order = Loadable(() => import(/* webpackChunkName: "order" */'../Order/Order'))

const My = Loadable(() => import(/* webpackChunkName: "order" */'../My/My'))
// import Home from "../Home/Home";
// import Order from "../Order/Order"
// import My from '../My/My'



// const My = Loadable({
//   loader: () => import('../My/My'),
//   loading: Loading
// })


import { Route, withRouter } from 'react-router-dom'
class Main extends React.Component {
  constructor(props) {
    super(props);

  }
  render() {
    return (
      <div>
        <Route exact path="/home" component={Home}></Route>
        <Route path="/order" component={Order}></Route>
        <Route path="/my" component={My}></Route>
        <BottomBar></BottomBar>
      </div>
    );
  }
}

export default withRouter(connect(() => ({}))(Main));
